import fetch from '@/utils/fetch'

const BusinessApi = {
  getPageList (params) {
    return fetch({
      url: '/api/business/page',
      method: 'get',
      params: params
    })
  },
  add (params) {
    return fetch({
      url: '/api/business',
      method: 'post',
      data: params
    })
  },
  update (params) {
    return fetch({
      url: '/api/business/' + params.id,
      method: 'put',
      data: params
    })
  },
  del (params) {
    return fetch({
      url: '/api/business/' + params,
      method: 'delete'
    })
  },
  put (params) {
    return fetch({
      url: '/api/business/goods/put',
      method: 'post',
      data: params
    })
  }
}
export default BusinessApi
